<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../comm-header.jsp" %>
<%@ page language="java" import="java.net.URLEncoder,java.util.Map,java.util.HashMap" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<c:set var="contextPath" value="${pageContext.request.contextPath}" scope="application"/>
<title>新东网用户中心公共平台</title>
<meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no">
<link rel="shortcut icon" href="${contextPath}/favicon.ico" type="image/x-icon" />
<%-- <link href="${contextPath}/resources/yhzx/css/bootstrap.css" rel="stylesheet">
<link href="${contextPath}/resources/yhzx/css/login.css" rel="stylesheet">
<link href="${contextPath}/resources/yhzx/css/forms.css" rel="stylesheet"> --%>
<link href="${contextPath}${appStyleUrl}" rel="stylesheet">
<link href="${contextPath}${appPopupUrl}" rel="stylesheet">
<script src="${contextPath}/resources/js/jquery.min.js"></script>
<script src="${contextPath}/resources/js/bootstrap.min.js"></script>
<script src="${contextPath}/resources/js/DES3.js"></script>
<script src="${contextPath}/resources/myjs/UCenterCommon.js"></script>
<script src="${contextPath}/resources/myjs/OAuthLogin.js"></script>
<script type="text/javascript" src="/UcConfig/uca/GlobalParams.js"></script>
</head>

<body style="background-color:#E7E7E7;">

  <div class="login-bg">
    <div class="container logo">
    	<%-- <img src="${contextPath}/resources/yhzx/img/logo.png"> --%>
    </div>
    <form id="loginForm" name="loginForm" action="${contextPath}/oauth/authorize" method="post">
	    <input type="hidden" name="client_id" value="<%=java.net.URLEncoder.encode(request.getParameter("client_id") == null ? "" : (String) request.getParameter("client_id"))%>"/>
	    <input type="hidden" name="scope" value="<%=java.net.URLEncoder.encode(request.getParameter("scope") == null ? "" : (String) request.getParameter("scope"))%>"/>
	    <input type="hidden" name="response_type" value="<%=java.net.URLEncoder.encode(request.getParameter("response_type") == null ? "" : (String) request.getParameter("response_type"))%>"/>
	    <input type="hidden" name="redirect_uri" value="<%=java.net.URLEncoder.encode(request.getParameter("redirect_uri") == null ? "" : (String) request.getParameter("redirect_uri"))%>"/>
	    <input type="hidden" name="state" value="<%=java.net.URLEncoder.encode(request.getParameter("state") == null ? "" : (String) request.getParameter("state"))%>"/>
	    <input type="hidden" name="client_secret" value="<%=java.net.URLEncoder.encode(request.getParameter("client_secret") == null ? "" : (String) request.getParameter("client_secret"))%>"/>
	    <div class="container">
		    <div class="input-style">
		    
		       <div class="input-group">
		    		<div class="input-group-addon icon-user"></div>
		    		<input type="text" class="form-control" name="username" value="<%=java.net.URLEncoder.encode(request.getAttribute("username") == null ? "" : (String) request.getAttribute("username"))%>" placeholder="用户名" >
		       </div>
		
		        <div class="input-group">
		    		<div class="input-group-addon icon-password"></div>
		    		<input type="password" class="form-control" id="password" name="password" placeholder="密码">
		       </div>
		       
		       <div style="padding-left:40px;width:390px; color:red;">${oauth_login_error_message}</div>
		       <!-- <div class="checkbox">
		    		<label>
		    			<input type="checkbox" value="" />
		    			<i class="input-helper">记住密码</i>
		    		</label>
		    	</div> -->
		       
		       <div class="btn" onclick="UCenterCommon.loginSubmit()"><a class="btn-login">登&nbsp;&nbsp;录</a></div>
		       <div>
				  <a class="email" href="https://oa.doone.com.cn/dc/mailbox/mailbox.action">总经理信箱</a>
		       		<a class="wfdl" id="myModalLink" data-target="#myModalContainer" role="button" data-toggle="modal">无法登陆？</a>
		    </div>
	 	</div>
	 	</div>
 	</form>
	</div>
	
	<div class="modal fade" id="myModalContainer" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"  style="overflow-y: auto;">
        <div class="modal-dialog">
            <div  id="wrapper" class="modal-content ">
                 <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="glyphicon glyphicon-remove"></i></button>
                
	  				<div id="login_form" class="form">
						<form class="register-form" id="resetForm">
                        	 <button type="button" class="close return" name="Submit" onclick="OAuthLogin.resetPasswordBack();"><i class="glyphicon glyphicon-chevron-left"></i></button>
                        	<h3 class="modal-title" >找回密码</h3><p></p>
                    		<p>验证码将会发送至你的手机</p>
                            <div class="xdw-form"></div>
                            <div class="xdw-form">
                				<label class="form-text">账号名</label>
                				<input type="text" class="input col-sm-8" id="userAccount">
       						</div>
       
       						<div class="xdw-form">
               					<label class="form-text">手机号</label>
                				<input type="text" class="input col-sm-8" id="mobilePhone">
       						</div>

        					<div class="xdw-form">
                				<label class="form-text">验证码</label>
                				<input type="text" class="input col-sm-6"  id="code">
                				<a class="yzm1" onclick="OAuthLogin.sendMessage(this)"><span class="yzm active">点击获取</span></a>
       						</div>
       						<div style="padding-left:40px;width:390px; color:red;"><span id="message"></span></div>
                            <br>
		  					<p class=""><a class="btn btn-primary btn-login" onclick="OAuthLogin.resetPassword()">重置密码</a></p>
						</form>
						
						<form class="register-form" id="smsLoginForm" action="${contextPath}/oauth/smsRedirectAuth" method="post">
							<input type="hidden" name="client_id" value="<%=java.net.URLEncoder.encode(request.getParameter("client_id") == null ? "" : (String) request.getParameter("client_id"))%>"/>
						    <input type="hidden" name="scope" value="<%=java.net.URLEncoder.encode(request.getParameter("scope") == null ? "" : (String) request.getParameter("scope"))%>"/>
						    <input type="hidden" name="response_type" value="<%=java.net.URLEncoder.encode(request.getParameter("response_type") == null ? "" : (String) request.getParameter("response_type"))%>"/>
						    <input type="hidden" name="redirect_uri" value="<%=java.net.URLEncoder.encode(request.getParameter("redirect_uri") == null ? "" : (String) request.getParameter("redirect_uri"))%>"/>
						    <input type="hidden" name="state" value="<%=java.net.URLEncoder.encode(request.getParameter("state") == null ? "" : (String) request.getParameter("state"))%>"/>
						    <input type="hidden" name="client_secret" value="<%=java.net.URLEncoder.encode(request.getParameter("client_secret") == null ? "" : (String) request.getParameter("client_secret"))%>"/>
	    					<input type="hidden" name="url" id="pageUrl">
                        	 <button type="button" class="close return" name="Submit" onclick="OAuthLogin.loginBack();"><i class="glyphicon glyphicon-chevron-left"></i></button>
                        	<h3 class="modal-title" >手机验证登录</h3><p></p>
                    		<p>验证码将会发送至你的手机</p>
                            <div class="xdw-form"></div>
                            <div class="xdw-form">
                				<label class="form-text">账号名</label>
                				<input type="text" class="input col-sm-8" id="account" name="userAccount">
       						</div>
       
       						<div class="xdw-form">
               					<label class="form-text">手机号</label>
                				<input type="text" class="input col-sm-8" id="phone" name="mobilePhone">
       						</div>

        					<div class="xdw-form">
                				<label class="form-text">验证码</label>
                				<input type="text" class="input col-sm-6" id="Code" name="smsCode">
                				<a class="yzm1" onclick="OAuthLogin.sendMessageLogin(this)"><span class="yzm active">点击获取</span></a>
                				
       						</div>
       						<div style="padding-left:40px;width:390px; color:red;"><span id="message1"></span></div>
                            <br>
		  					<p class=""><a class="btn btn-primary btn-login" onclick="OAuthLogin.SMSLogin()">确定登录</a></p>
						</form>
                        
                        
						<form class="login-form">
                        	<h3 class="modal-title" >无法登陆</h3><p></p>
                    		<p>我们提供两种方式帮助你重新登录用户中心</p>
                            <br>
		  					<p class="message"><a class="btn btn-primary btn-login" onclick="OAuthLogin.showResetPassword();">找回密码</a></p>
                            <p class="message"><a class="btn btn-primary btn-login" onclick="OAuthLogin.showLogin();">使用手机验证码登录</a></p>
						</form>
				</div>
            </div>
         </div>
     </div>

<script type="text/javascript">
	document.onkeydown = keyListener;
	function keyListener(e) {
		e = e ? e : event;
		if (e.keyCode == 13) {
			UCenterCommon.loginSubmit();
		}
	}
	OAuthLogin.initPage();
	
</script>
  
</body>
</html>
